package com.team.game.Game.Towers;

import android.graphics.RectF;

import com.team.game.framework.Abstract.Tower;
import com.team.game.framework.Game;

import java.util.ArrayList;

import static com.team.game.framework.impl.Scale_X_Y.Scale_X;
import static com.team.game.framework.impl.Scale_X_Y.Scale_Y;

public class TowerMaker {

    public final RectF[] towerPosition = new RectF[4];

    public TowerMaker() {

        towerPosition[0] = new RectF(371 * Scale_X, 1556 * Scale_Y, 430 * Scale_X, 1611 * Scale_Y);
        towerPosition[1] = new RectF(648 * Scale_X, 1556 * Scale_Y, 711 * Scale_X, 1611 * Scale_Y);
        towerPosition[2] = new RectF(916 * Scale_X, 1587 * Scale_Y, 976 * Scale_X, 1642 * Scale_Y);
        towerPosition[3] = new RectF(115 * Scale_X, 1587 * Scale_Y, 174 * Scale_X, 1642 * Scale_Y);

    }

    public ArrayList<Tower> makeTowers(Game game, int level) {

        ArrayList<Tower> towers = new ArrayList<Tower>(4);

        switch (level) {
            case 1:
                towers.add(0, new TowerMelee(towerPosition[0], game));
                towers.add(1, new TowerMelee(towerPosition[1], game));
                towers.add(2, new TowerRange(towerPosition[2], game));
                towers.add(3, new TowerRange(towerPosition[3], game));
                break;
            case 2:
                towers.add (0, new TowerMelee (towerPosition[0], game));
                towers.add (1, new TowerMelee (towerPosition[1], game));
                towers.add (2, new TowerRange (towerPosition[2], game));
                towers.add (3, new TowerRange (towerPosition[3], game));
                break;
            case 3:
                towers.add (0, new TowerMelee (towerPosition[0], game));
                towers.add (1, new TowerMelee (towerPosition[1], game));
                towers.add (2, new TowerRange (towerPosition[2], game));
                towers.add (3, new TowerRange (towerPosition[3], game));
                break;
            default:
        }
        return towers;
    }

    public void modify() {

    }


}
